<?php

namespace Database\Seeders;

use App\Models\LogisticsCompany;
use Illuminate\Database\Seeder;

class LogisticsCompanySeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $companies = [
            [
                'name' => '顺丰速运',
                'code' => 'SF',
                'website' => 'https://www.sf-express.com',
                'phone' => '95338',
                'description' => '顺丰速运是国内领先的快递物流综合服务商',
                'is_active' => true,
                'sort_order' => 1
            ],
            [
                'name' => '圆通速递',
                'code' => 'YTO',
                'website' => 'https://www.yto.net.cn',
                'phone' => '95554',
                'description' => '圆通速递是国内知名的快递物流企业',
                'is_active' => true,
                'sort_order' => 2
            ],
            [
                'name' => '中通快递',
                'code' => 'ZTO',
                'website' => 'https://www.zto.com',
                'phone' => '95311',
                'description' => '中通快递是国内领先的快递物流企业',
                'is_active' => true,
                'sort_order' => 3
            ],
            [
                'name' => '申通快递',
                'code' => 'STO',
                'website' => 'https://www.sto.cn',
                'phone' => '95543',
                'description' => '申通快递是国内知名的快递物流企业',
                'is_active' => true,
                'sort_order' => 4
            ],
            [
                'name' => '京东物流',
                'code' => 'JD',
                'website' => 'https://www.jdl.cn',
                'phone' => '950616',
                'description' => '京东物流是京东集团旗下的物流服务品牌',
                'is_active' => true,
                'sort_order' => 5
            ],
            [
                'name' => '邮政EMS',
                'code' => 'EMS',
                'website' => 'https://www.ems.com.cn',
                'phone' => '11183',
                'description' => '中国邮政速递物流股份有限公司',
                'is_active' => true,
                'sort_order' => 6
            ]
        ];

        foreach ($companies as $companyData) {
            LogisticsCompany::create($companyData);
        }

        $this->command->info('✅ 创建了 ' . count($companies) . ' 家物流公司');
    }
}
